package com.chuqiyun.authorization.utils;

import java.util.Random;

/**
 * @author mryunqi
 * @date 2023/4/22
 */
public class OrderUtil {

    public static String generateOrderNo() {
        String orderNoPrefix = "ORDER";
        long timestamp = System.currentTimeMillis();
        String timestampStr = String.valueOf(timestamp);
        String randomNumber = String.valueOf(new Random().nextInt(900) + 100);
        return orderNoPrefix + timestampStr + randomNumber;
    }
}
